package com.wclass.controller.app;


import com.wclass.common.ReturnObject;
import com.wclass.service.IBaseFeedbackService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 意见反馈 前端控制器
 * </p>
 *
 * @author SEN
 * @since 2019-02-28
 */
@Api(description = "反馈管理")
@RestController
@RequestMapping("/baseFeedback")
public class FeedbackController {
    @Autowired
    private IBaseFeedbackService iBaseFeedbackService;

    @ApiOperation("新增意见反馈信息")
    @RequestMapping(value = "/saveFeedBackInfo", method = RequestMethod.POST)
    public ReturnObject<Object> saveFeedBackInfo(@ApiParam("反馈内容") String content,
                                                 @ApiParam("邮箱") String email,
                                                 @ApiParam("电话") String phone) {
        iBaseFeedbackService.insertInfo(0, content, email, phone, 0);
        return new ReturnObject<>(0, "提交成功");
    }


}

